home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / self / contrib.lha / contrib / 491 / navel / gcCacheStruct.self < prev    next >
Encoding:
Text File  |  1993-07-18  |  1.2 KB  |  51 lines

  1. "gcCacheStruct.self,v 1.5 1993/07/18 20:24:06 richards Exp"
  2. "viewManager - self internal analogue of a display"
  3.  
  4. traits     _AddSlotsIfAbsent: (| ^ views* = () |)
  5. prototypes _AddSlotsIfAbsent: (| ^ views* = () |)
  6. mixins     _AddSlotsIfAbsent: (| ^ views* = () |)
  7. oddballs   _AddSlotsIfAbsent: (| ^ views* = () |)
  8.  
  9. traits views _AddSlotsIfAbsent: (| ^ gcCacheStruct = () |)
  10. prototypes views _AddSlotsIfAbsent: (| ^ gcCacheStruct = () |)
  11.  
  12. traits views gcCacheStruct _Define: (|
  13.     parent** = traits clonable.
  14.     printString = (
  15.     'GC cached font=', fontId printString, '/LineWidth=',lineWidth printString,'/CopyFunction=',copyFunction printString
  16.     ).
  17.     realiseGC = (
  18.     gc font: fontId.
  19.     gc foreground: blackPixel.  
  20.     gc background: whitePixel.
  21.     gc lineWidth: lineWidth.
  22.     gc function: copyFunction.
  23. "    gc plane_mask: planeMask."
  24.     ).
  25.  
  26.     gc: aGC = (
  27.     iGC: aGC.
  28.     fontId: aGC font.
  29.     blackPixel: aGC foreground.
  30.     whitePixel: aGC background.
  31.     lineWidth: aGC lineWidth.
  32. "    planeMask: aGC plane_mask."
  33.     ).
  34.     gc         = ( iGC ).
  35.  
  36.     copy = ( clone ).
  37. |)
  38.  
  39. prototypes views gcCacheStruct _Define: (|
  40.     parent* = traits views gcCacheStruct.
  41.     thisObjectPrints = true.
  42.     fontId.
  43.     lineWidth.
  44.     copyFunction.
  45.     whitePixel.
  46.     blackPixel.
  47.     planeMask.
  48.     iGC.
  49. |).
  50.  
  51.